<template>
    <div>
        <el-row class="border-bottom">
            <el-col :span="12">
                <strong>客户编码:</strong>
                <span class="m-l">{{detail.customerSn}}</span>
            </el-col>
            <el-col :span="12">
                <strong>客户名称:</strong>
                <span class="m-l">{{detail.customerName}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>客户类型:</strong>
                <span class="m-l">{{detail.customerTypeName}}</span>
            </el-col>
            <el-col :span="12">
                <strong>客户级别:</strong>
                <span class="m-l">{{detail.customerLevelName}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>公司性质:</strong>
                <span class="m-l">{{detail.companyNatureName}}</span>
            </el-col>
            <el-col :span="12">
                <strong>客户经理:</strong>
                <span class="m-l">{{detail.directorName}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>客户联系人:</strong>
                <span class="m-l">{{detail.contact}}</span>
            </el-col>
            <el-col :span="12">
                <strong>联系手机:</strong>
                <span class="m-l">{{detail.telephone}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>座机电话:</strong>
                <span class="m-l">{{detail.phoneNumber}}</span>
            </el-col>
            <el-col :span="12">
                <strong>客户标签:</strong>
                <span class="m-l">{{detail.tags}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>销售区域:</strong>
                <span class="m-l">{{detail.areaName}}</span>
            </el-col>
            <el-col :span="12">
                <strong>市场:</strong>
                <span class="m-l">{{detail.marketName}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>是否标注定位:</strong>
                <span class="m-l">{{detail.positionFlag ? '是' : '否'}}</span>
            </el-col>
            <el-col :span="12">
                <strong>详细地址:</strong>
                <span class="m-l">{{detail.address}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="24">
                <strong>门头照:</strong>
                <div class="m-l">
                    <img v-for="item in detail.photoList"  width="100" :src="item.picUrl">
                </div>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>营业时间描述:</strong>
                <span class="m-l">{{detail.serviceTime}}</span>
            </el-col>
            <el-col :span="12">
                <strong>年经营流水:</strong>
                <span class="m-l">{{detail.shopSale}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>经营面积:</strong>
                <span class="m-l">{{detail.operateArea}}</span>
            </el-col>
            <el-col :span="12">
                <strong>经营法人名称:</strong>
                <span class="m-l">{{detail.legalName}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>营业执照编码:</strong>
                <span class="m-l">{{detail.bizLicense}}</span>
            </el-col>
            <el-col :span="12">
                <strong>营业执照名称:</strong>
                <span class="m-l">{{detail.licenseName}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>经营地址:</strong>
                <span class="m-l">{{detail.regAddress}}</span>
            </el-col>
            <el-col :span="12">
                <strong>工商注册号:</strong>
                <span class="m-l">{{detail.registrationNum}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>客户注册全称:</strong>
                <span class="m-l">{{detail.regName}}</span>
            </el-col>
            <el-col :span="12">
                <strong>注册时间:</strong>
                <span class="m-l">{{detail.registrationDate}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>传真:</strong>
                <span class="m-l">{{detail.fax}}</span>
            </el-col>
            <el-col :span="12">
                <strong>网址:</strong>
                <span class="m-l">{{detail.website}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>邮编:</strong>
                <span class="m-l">{{detail.postcode}}</span>
            </el-col>
            <el-col :span="12">
                <strong>业务介绍:</strong>
                <span class="m-l">{{detail.bizDesc}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="12">
                <strong>备注:</strong>
                <span class="m-l">{{detail.remarks}}</span>
            </el-col>
        </el-row>
        <el-row class="border-bottom m-t-hg">
            <el-col :span="24">
                <strong>营业执照:</strong>
                <div class="m-l">
                    <img v-for="item in detail.licensePhotoList"  width="100" :src="item.picUrl">
                </div>
            </el-col>
        </el-row>
    </div>
</template>

<script>
import {fetchDictAsync} from '@/util/util';
import { getStatusName } from '@/const/common/tool';
export default {
    props: {
        detail: {
            type: Object
        }
    },
    data() {
        return {
            customer_status: [],
            customer_type: [],
            customer_level: [],
            company_nature: [],
        }
    },
    created() {
        this.init();
    },
    methods: {
        async init() {
            await fetchDictAsync('customer_status', this.customer_status);
            await fetchDictAsync('scm_customer_type', this.customer_type);
            this.$set(this.detail, 'customerTypeName', getStatusName(this.customer_type, this.detail.customerType));
            await fetchDictAsync('scm_customer_level', this.customer_level);
            this.$set(this.detail, 'customerLevelName', getStatusName(this.customer_level, this.detail.customerLevel));
            await fetchDictAsync('scm_company_nature', this.company_nature);
            this.$set(this.detail, 'companyNatureName', getStatusName(this.company_nature, this.detail.companyNature));
        }
    }
}
</script>